﻿<UserControl x:Class="UIComposition.EmployeeModule.Views.EmployeeSummaryView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:regions="http://www.codeplex.com/CompositeWPF">
    <UserControl.Resources>
        <Style TargetType="{x:Type TabItem}"
               x:Key="HeaderStyle">
            <Setter Property="Header"
                    Value="{Binding RelativeSource={RelativeSource Self}, 
                    Path=Content.DataContext.ViewName}" />
        </Style>
    </UserControl.Resources>
    <Grid x:Name="LayoutRoot">
        <Grid.Background>
            <LinearGradientBrush EndPoint="0.5,1"
                                 StartPoint="0.5,0">
                <GradientStop Color="#FF7B97D4" />
                <GradientStop Color="#FF244C8D"
                              Offset="1" />
            </LinearGradientBrush>
        </Grid.Background>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>

        <TextBlock Grid.Row="0"
                   Text="Employee Summary View"
                   TextWrapping="Wrap"
                   FontSize="18"
                   Foreground="#FF2F3806"
                   Margin="8" />

        <!--The Tab control defines a region, TabRegion, into which the EmployeeDetailsView and EmployeeProjectsView will be displayed.-->
        <!--The TabRegion defines a RegionContext which provides a reference to the currently selected employee.-->
<TabControl Grid.Row="1"
            AutomationProperties.AutomationId="EmployeeSummaryTabControl"
            Margin="8"
            regions:RegionManager.RegionName="TabRegion"
            regions:RegionManager.RegionContext="{Binding CurrentEmployee}"
            Width="Auto"
            Height="Auto"
            HorizontalAlignment="Stretch"
            ItemContainerStyle="{StaticResource HeaderStyle}">
</TabControl>
    </Grid>
</UserControl>